package cn.itcast.dubbo.controller;

import cn.itcast.dubbo.pojo.User;
import cn.itcast.dubbo.service.ApiUserService;
import cn.itcast.dubbo.service.UserService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Hujf
 * @title: UserController
 * @description: TODO
 * @date 2020/7/21 0021下午 4:53
 */
@RestController
@RequestMapping("/index")
public class UserController {

    @Reference(version = "1.0.0")
    private  ApiUserService apiUserService;

    @Resource
    UserService userService;
    @RequestMapping("/getUser")
    public User getUser(){
        return userService.getUser();
    }
}
